package org.simple.wechat.demo.config;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import org.simple.wechat.demo.dto.Season;

import java.io.IOException;

/***
 * @author gaoqijin
 * @date 2020-11-18
 * @Description
 */
public class SeasonSerializer extends JsonSerializer<Season> {
    @Override
    public void serialize(Season season, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
        jsonGenerator.writeString(season.getDesc());
    }
}
